<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- jQuery -->
	<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
    <!-- jQuery UI, for D'n'D functionality -->
	<script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
    <!-- Bootstrap -->
    <script src="includes/bootstrap/js/bootstrap.min.js"></script>
	<!-- TinyMCE -->
	<script type="text/javascript" src="includes/tinymce/jscripts/tiny_mce/jquery.tinymce.js"></script>
    
    <script src="includes/js/userManagement.js"></script>
	<script src="includes/js/page.js"></script>
    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    
    <script>
	// Prevent bootstrap dialog from blocking focusin
    $(document).on('focusin', function(e) {
	  if ($(e.target).closest(".mce-window").length) {
        e.stopImmediatePropagation();
	  }
	});
    $(document).ready(function(){
	  page.init();		// Initialise page
	  $.ajax ({			// Get site info from config
		url: 'includes/functions/getSiteInfo.php',  // Use this script to get site info
		success: function (data) {		            // When data is returned
		  $('head').append('<title>'+data.title+'</title>');
		  $('.page-header').append('<h1>'+data.title+' <small>'+data.sub+'</small></h1>');
		}
	  });
    });
	
	function fileBrowser (field_name, url, type, win) {
	  cmsURL = 'folders.html';
	  //add the type as the only query parameter
	  cmsURL = cmsURL + "?type=" + type;

	  tinyMCE.activeEditor.windowManager.open({
		file : cmsURL,
		title : 'My File Browser',
		width : 800,  // Your dimensions may differ - toy around with them!
		height : 440,
		resizable : "no",
		inline : "yes",  // This parameter only has an effect if you use the inlinepopups plugin!
		close_previous : "yes",
		popup_css : false
	  }, {
		window : win,
		input : field_name
	  });
	  return false;
	}
	</script>
  </head>
  
  <body>
    
    <header>
        <div class="container page-header"></div>
    </header>
    
    <a href="#content" class="sr-only">Skip to main content</a>
    
    <nav>
        <div class="container">
            <ul id="mainMenu" class="nav nav-tabs blog-nav">
            </ul>
        </div>
    </nav>

    <div class="container" id="content"> 
     
        <div id="mainContent" class="col-sm-2 sidebar well">
        <!-- Sidebar menu -->
        	<!-- alertplace holder to inform users -->
			<div id="alert_placeholder_mainPage"></div>
			<div id="userMenu" class="sidebar-module">
				<!-- LOGIN FORM /MODAL  sitePages/sidebarLoginModule.html-->
				<div id="loginPlaceholder"></div> 
				<!-- RegUser FORM /MODAL sitePages/sidebarRegUserModule.html -->         	
				<div id="regUserPlaceholder"></div>
            </div>
			<!-- Loaded in when user login, sitePages/userOption -->
			<div id="userOptions" class="sidebar-module"></div>
        </div><!-- /.sidebar -->
		
        <div id="elements" class="col-sm-8 col-md-offset-1 main"></div><!-- /.main -->
    
	</div><!-- /.container -->
    
	<footer>
      <p>Powered by LATP,OEP,JHL 2014</p>
      <p>
        <a href="#">Til toppen</a>
      </p>
    </footer>
  
  </body>
</html>